package com.ucode.application.form.sys;

import java.io.Serializable;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import com.ucode.springboot.starter.web.validator.annotation.CheckMember;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 系统菜单表单实体
 * @author: liliang
 * @date: 2019年12月16日 下午8:31:49
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="系统菜单")
public class MenuForm implements Serializable{

    private static final long serialVersionUID = 1751240615196045734L;
    
    /**
     * 父级菜单
     */
    @ApiModelProperty(value = "父级菜单Id",required=false)
    private Long pid;
    /**
     * 名称
     */
    @ApiModelProperty(value = "菜单名称",required=true)
    @NotBlank(message = "菜单名称不能为空")
    @Length(max=100,message = "菜单名称最大100字符")
    private String name;
    
    /**
     * 权限值
     */
    @ApiModelProperty(value = "权限值",required=true)
    @NotBlank(message = "权限值不能为空")
    @Length(max=100,message = "权限值最大100字符")
    private String permission;
    /**
     * 子系统类型
     */
    @ApiModelProperty(value = "子系统类型:0->系统设置1->CRM系统2->OA系统) ",required=false,example="0")
    @CheckMember(value={"0","1","2"},message="子系统类型非法")
    private Integer subSys;
    /**
     * 菜单类型1导航2菜单3页签 4按钮
     */
    @ApiModelProperty(value = "菜单类型1导航2菜单3页签 4按钮) ",required=true,example="4")
    @NotNull(message = "菜单类型不能为空")
    @CheckMember(value={"1","2","3","4"},message="菜单类型非法")
    private Integer menuType;

    /**
     * 菜单说明
     */
    @ApiModelProperty(value = "菜单说明",required=false)
    @Length(max=255,message = "菜单说明最大长度255字符")
    private String remark;
}
